package com.example.tests.pages;

import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;

public abstract class AnyPage extends Page {
	@FindBy( xpath = "//div[ @class = \"languages\" ]/ul/li[1]/a" )
	private WebElement eng;
	@FindBy( xpath = "//div[ @class = \"languages\" ]/ul/li[2]/a" )
	private WebElement ned;
	@FindBy( xpath = "//header//h1" )
	private WebElement header;
	public String getHeaderText() {
		return header.getText();
	}
	public AnyPage changeLanguageToEng() {
		eng.click();
		return this;
	}
	public AnyPage changeLanguageToNed() {
		ned.click();
		return this;
	}
	
}
